package com.sdry.transit.service;
import java.util.List;
import javax.annotation.Resource;

import com.sdry.basic.entity.ContainerStare;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.sdry.transit.entity.TransitLoading;
import com.sdry.transit.service.TransitLoadingService;
import com.sdry.transit.mapper.TransitLoadingMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 *
 *@ClassName: TransitLoadingService
 *@Description: 车辆信息
 *@Author tdd
 *@Date 2020-03-11 12:13:41
 *@version 1.0
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class TransitLoadingServiceImpl implements TransitLoadingService {
	@Resource TransitLoadingMapper transitLoadingMapper;
	//声明一个Logger
	private final static Logger logger = LoggerFactory.getLogger(TransitLoadingServiceImpl.class);
	/** 
	 * 根据主键id查询实体
	 * @param id 主键id
	 * @return 实体
	*/
	public TransitLoading queryById(Long id) {
		return transitLoadingMapper.queryById(id);
	}
	/** 
	 * 条件查询所有
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public List<TransitLoading> queryAllByMution(TransitLoading param) {
		return transitLoadingMapper.queryAllByMution(param);
	}
	/** 
	 * 条件分页查询
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public List<TransitLoading> findPageByMution(TransitLoading param) {
		return transitLoadingMapper.findPageByMution(param);
	}
	/** 
	 * 条件查询记录数
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public Integer selectCountByMution(TransitLoading param) {
		return transitLoadingMapper.selectCountByMution(param);
	}
	/** 
	 * 插入返回id
	 * @param param 实体条件
	 * @return 主键id
	*/
	public Long insert(TransitLoading param) {
		return transitLoadingMapper.insert(param);
	}
	/** 
	 * 根据主键更新 返回影响行数
	 * @param param 实体条件
	 * @return 影响行数
	*/
	public Integer update(TransitLoading param) {
		return transitLoadingMapper.update(param);
	}
	/** 
	 * 根据主键拼接的字符串删除返回影响行数
	 * @param ids 主键拼接的字符串
	 * @return 影响行数
	*/
	public Integer delete(String ids) {
		return transitLoadingMapper.delete(ids);
	}

	/**
	 * 根据车辆信息查询装载信息
	 * @param param
	 * @return
	 */
	public List<ContainerStare> selectContainerStareByTlid(TransitLoading param) {
		return transitLoadingMapper.selectContainerStareByTlid(param);
	}

	/**
	 * 根据车辆信息查询装载信息条数
	 * @param param
	 * @return
	 */
	public Integer selectCountContainerStareByTlid(TransitLoading param) {
		return transitLoadingMapper.selectCountContainerStareByTlid(param);
	}
}
